#include <stdio.h>

int fibonacci(int n)
{
    int a = 1, b = 1, c = 1, i;
    if (n == 0 || n == 1)
        return 1;
    for (i = 1; i < n; i++) {
        c = a;
        a = a + b;
        b = c;
    }
    return a;
}

int main()
{
    int nCase;
    for (scanf("%d", &nCase); nCase > 0; nCase--)
    {
        int n;
        scanf("%d", &n);
        printf("%d\n", fibonacci(n));
    }
    return 0;
}

